﻿<%@ Control Language="C#" AutoEventWireup="true" Inherits="demo.Controls.Attachment" Codebehind="Attachment.ascx.cs" %>
<%@ Register Assembly="Anthem" Namespace="Anthem" TagPrefix="anthem" %>

<anthem:Repeater ID="rep_Attachment" runat="server"  OnItemCommand='rep_Attachment_ItemCommand' AutoUpdateAfterCallBack="true" EnableCallBack="true">
    <HeaderTemplate>
        <table style="width:100%" class="divTable" cellpadding="0" cellspacing="0">
            <thead class="Title">
                <tr style="background:url(../../Resource/Images/Icon_TableTitle.gif) repeat-x;">
                    <td style="width:16px;"></td>
                    <td>文件名</td>
                    <td style="width:44px">大小</td>
                    <td style="width:42px;">上传人</td>
                    <td style="width:108px;">上传时间</td>
                    <td colspan="2" style="width:50px;">操作</td>
                </tr>
            </thead>
    </HeaderTemplate>
    <ItemTemplate>
        <tr class="Item">
            <td style="padding-left:1px"><anthem:ImageButton ID="img_Icon" ImageUrl='<%# Eval("FileExtend") %>' style="width:16px; height:16px;" runat="server" Enabled="false" /></td>
            <td><a title="点击下载" href="#" target="_top" style="text-decoration:none; color:Black;" onclick="javascript:FileHandler('<%=UrlRoot %>Workflow/FileHandler.ashx?File=<%# Eval("EncryptFileName") %>');"><%#Eval("FileName")%></a></td>
            <td><%#Eval("FileSize")%></td>
            <td><%#Eval("UserFullName")%></td>     
            <td><%#Eval("TimeShow")%></td>
            <td style="width:49px;">
                <anthem:ImageButton ID="img_Del" ImageUrl="~/Resource/Images/Icon_Delete.gif" CommandName="Delete" CommandArgument='<%# Eval("ID") %>' runat="server" alt="删除" AutoUpdateAfterCallBack="true" />
                <anthem:ImageButton ID="img_View" ImageUrl="~/Resource/Images/Icon_View.gif" CommandName="View" CommandArgument='<%# Eval("EncryptFileName") %>' runat="server" alt="点击下载" AutoUpdateAfterCallBack="true" />
            </td>
            <td style="display:none; width:1px;">
                <anthem:Label ID="lbl_FileName" runat="server" Text='<%# Eval("FileName") %>'></anthem:Label>
                <anthem:Label ID="lbl_UserName" runat="server" Text='<%# Eval("UserName") %>'></anthem:Label>
            </td>
        </tr>
    </ItemTemplate>
    <FooterTemplate>
         <tr class="Item" style="height:28px;<%=IsShow%>">
            <td></td>
            <td colspan="6">
                <anthem:FileUpload ID="File" runat="server" AutoUpdateAfterCallBack="true" />                
                <anthem:Button ID="btn_Upload" runat="server" CommandName="Upload" AutoUpdateAfterCallBack="true" EnableCallBack="true" style="background:url('../../Resource/Images/Icon_ButtonBg.gif') 0px -12px; border:1px solid #FCC245; padding-top:2px; cursor:pointer;height:22px;width:60px;margin-right:4px;margin-top:4px;margin-bottom:4px; margin-left:10px;" Text="上传" />
            </td>
         </tr>
        </table>
    </FooterTemplate>
</anthem:Repeater>